<% include ../pageHeader %>

<div id="mainWrapper">
    <div id="content" class="content">
        <div id="innerContent">
            <div class="textbox">
                <div class="textbox-title"><h4><%= __('attachments') %></h4></div>
                <div class="textbox-content">
                    <% if(bShowParent){ %>
                        <a href="?in=attachment"><img
                                    src="<%= theCache.settings["imageFolder"] %>/icon_folder_up.gif"/> <%= __('parent_folder') %>
                        </a><br/><br/>
                    <% } %>
                    <% for(var i = 0;i < arrList.length;i++){ %>
                        <% if(arrList[i].type == "file"){ %>
                            <a href="<%= strBasePath+strCurrentPath+escape(arrList[i].name) %>" target="_blank">
                                <img src="<%= theCache.settings["imageFolder"] %>/icon_file.gif"/>
                                <b><%= helper.HTMLEncodeLite(arrList[i].name) %></b></a> |
                            <%= arrList[i].size %> |
                            <a href="?in=attachment&act=delete&file=<%= strCurrentPath+escape(arrList[i].name) %>"
                               onclick="return confirm('<%= __('confirm_delete_file') %>?')"><%= __('delete') %></a>
                        <% }else{ %>
                            <a href="?in=attachment&path=<%= strCurrentPath+escape(arrList[i].name) %>">
                                <img src="<%= theCache.settings["imageFolder"] %>/icon_folder.gif"/>
                                <b><%= helper.HTMLEncodeLite(arrList[i].name) %></b></a> |
                            <%= arrList[i].size %> |
                            <a href="?in=attachment&act=delete&folder=<%= strCurrentPath+escape(arrList[i].name) %>"
                               onclick="return confirm('<%= __('confirm_delete_folder') %>?')"><%= __('delete') %></a>
                        <% } %>
                        <br/>
                    <% } %>
                    <br/>
                    <span class="comment-text"><%= __('total') %>: <%= arrList.length %>&nbsp;<%= __('items') %>
                        (<%= __('delete_folder_note') %>)</span>
                </div>
            </div>
        </div>
    </div>
    <% include adminSidebar %>
    <div class="clear"></div>
</div>

<% include ../pageFooter %>
